package com.njwt.cloud.mscommon.support;

import com.njwt.cloud.mscommon.enums.MsHttpStatus;

import java.util.List;

/**
 * @author <a href="mailto:xingxiaofeng@gtmap.cn">xingxiaofeng</a>
 * @date 2022-06-10
 * @desc BaseController
 */
public class BaseController {

    public ApiResponse success(){
        return  new ApiResponse(MsHttpStatus.SUCCESS);
    }
    
    public ApiResponse success(List list){
      ApiResponse apiResponse=  new ApiResponse(MsHttpStatus.SUCCESS);
      apiResponse.setData(list);
        return apiResponse;
    }
    public ApiResponse success(Object data){
        ApiResponse re = new ApiResponse(MsHttpStatus.SUCCESS);
        re.setData(data);
        return  re;
    }
}
